package com.escool.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.escool.dao.TipoRecordDAO;
import com.escool.model.TbTipoRecord;
@Service
public class TipoRecordServiceImpl implements TipoRecordService {
	
	@Autowired
	TipoRecordDAO tipoRecordDAO;

	@Transactional
	public void add(TbTipoRecord dao) {
		tipoRecordDAO.add(dao);

	}

	@Transactional
	public void edit(TbTipoRecord dao) {
		tipoRecordDAO.edit(dao);

	}

	@Transactional
	public List<TbTipoRecord> listAll() {
		
		return tipoRecordDAO.listAll();
	}

	@Transactional
	public void delete(Integer id) {
		tipoRecordDAO.delete(id);
		
	}

	@Transactional
	public TbTipoRecord findById(Integer id) {
		
		return tipoRecordDAO.findById(id);
	}

}
